package com.xiaoshu.controller;

import java.util.Date;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.xiaoshu.log.Log;
import com.xiaoshu.model.Person;
import com.xiaoshu.security.IngoreSecurity;

/**
 * 
 * @author Administrator
 *
 */
@RestController
@RequestMapping(value="/main")
public class MainController {

	@IngoreSecurity
	@RequestMapping(value="/status" ,method=RequestMethod.GET)
	@Log
	public Person checkServerStatus(HttpServletRequest req, HttpServletResponse res){
		Person person = new Person();
		person.setAge(34);
		person.setBirthDay(new Date());
		person.setUserName("deane");
		return person;
	}
}
